#include "sg90_device.h"
#include "driver_sg90.h"
#include <string.h>

static int Sg90Init(struct Sg90Device *pDev)
{
    SG90_GPIO_Init();
    return PDSUCCESS;
}


static int Sg90Ctrl(struct Sg90Device *pDev, int status)
{
    return Sg90SetStatus(pDev, status);
}


static sg90Device Sg90Device = {
	.name = "SG90",
	.Init = Sg90Init,
	.Ctrl = Sg90Ctrl
};


pSg90Device GetSg90Device(char *name)
{
    if(strcmp(name, "SG90") == 0)
    {
        return &Sg90Device;
    }
    return NULL;
}

